import { Module } from "vuex";
import RootStateInterface, { WorkBranchModuleState, } from "../types";

const workbranchModule: Module<WorkBranchModuleState, RootStateInterface> = {
  namespaced: true,
  state: {
    componentList: [],
    dragingComponent: {}
  },
  getters: {
    componentList: (state) => state.componentList,
    dragingComponent: (state) => state.dragingComponent,
  },
  mutations: {
    SET_COMPONENT_LIST(state, val: Array<object>) {
      state.componentList = val;
    },
    SET_DRAGING_COMPONENT(state, val: object) {
      state.dragingComponent = val;
    },

  },
  actions: {}
}

export default workbranchModule